package gamesys;

import pkg.*;
import pkg.networking.*;

@SuppressWarnings("serial")
public class NetworkGame extends NormalGame  {
	
	private NetworkComponent network;
	private boolean host = false;
	private String name;

	private String address = "";
	private int port = 0;
	
	public NetworkGame(String name,boolean isHost)
	{
		this.name = name;
		host = isHost;
	}
	
	protected void intitialize()
	{
		map = new Map();
		map.createMap(10, 10);
		
		network = new NetworkComponent(name,host);
		
		components.addComponent(map);
		setupBasics();
		components.addComponent(network);
		components.initialize();
		player = network.getPlayer();
	}
	
	public void setAddress(String address)
	{ 
		this.address = address;
	}
	
	public void setPort(int port)
	{
		this.port = port;
	}

}
